package org.spring.aop.support;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * KeyServiceMethodInterceptor
 *
 * @author 李坤
 * @date 2022/4/19 9:16
 */
public class KeyServiceMethodInterceptor implements MethodInterceptor {

    private static final Logger logger = LoggerFactory.getLogger(KeyServiceMethodInterceptor.class);

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {

        logger.info("开始执行增强方法......");

        Object result = invocation.proceed();

        logger.info("结束执行增强方法......");

        return result;
    }
}
